{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "db194ec3",
   "metadata": {
    "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
    "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5",
    "papermill": {
     "duration": 0.006683,
     "end_time": "2022-03-30T02:05:38.937065",
     "exception": false,
     "start_time": "2022-03-30T02:05:38.930382",
     "status": "completed"
    },
    "tags": []
   },
   "source": [
    "# 金融市场基础（第22期）第12课书面作业\n",
    "学号：114847\n",
    "\n",
    "**作业内容：**  \n",
    "1. 举一个你所了解的金融市场操作风险的案例  \n",
    "2. 如果一家公司过去三年的营业收入分别是120mil，98mil，156mil，按照基本指标法，公司需要预留多少操作风险资本来覆盖未来可能的操作风险损失  "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "786b0feb",
   "metadata": {
    "papermill": {
     "duration": 0.005452,
     "end_time": "2022-03-30T02:05:38.948484",
     "exception": false,
     "start_time": "2022-03-30T02:05:38.943032",
     "status": "completed"
    },
    "tags": []
   },
   "source": [
    "## 第1题\n",
    "举一个你所了解的金融市场操作风险的案例。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "465afab4",
   "metadata": {
    "papermill": {
     "duration": 0.005348,
     "end_time": "2022-03-30T02:05:38.959367",
     "exception": false,
     "start_time": "2022-03-30T02:05:38.954019",
     "status": "completed"
    },
    "tags": []
   },
   "source": [
    "**答：**  \n",
    "2015年3月20日10:07，新三板做市指数瞬间从1717点调涨至2028点，涨幅约为18%。原因在于，三板做市指数的一只成分股——红豆杉出现异动。该股在同时间出现一笔68.40元的成交，股价瞬间涨幅约为852%。当日晚间，天风证券发布公告称，由于交易员下单失误，将其做市股票红豆杉买入下单6.8元/股下错为68元/股，并成交1000股，造成了上午的异动。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3b73be32",
   "metadata": {
    "papermill": {
     "duration": 0.005605,
     "end_time": "2022-03-30T02:05:38.970591",
     "exception": false,
     "start_time": "2022-03-30T02:05:38.964986",
     "status": "completed"
    },
    "tags": []
   },
   "source": [
    "## 第2题\n",
    "如果一家公司过去三年的营业收入分别是120mil，98mil，156mil，按照基本指标法，公司需要预留多少操作风险资本来覆盖未来可能的操作风险损失。\n",
    "\n",
    "**答：**  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "5cdf1603",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2022-03-30T02:05:38.992545Z",
     "iopub.status.busy": "2022-03-30T02:05:38.991711Z",
     "iopub.status.idle": "2022-03-30T02:05:38.996651Z",
     "shell.execute_reply": "2022-03-30T02:05:38.996045Z",
     "shell.execute_reply.started": "2022-03-30T01:36:24.833382Z"
    },
    "papermill": {
     "duration": 0.020644,
     "end_time": "2022-03-30T02:05:38.996816",
     "exception": false,
     "start_time": "2022-03-30T02:05:38.976172",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "capital at operation risk(CAOR): 18.700000 mil\n"
     ]
    }
   ],
   "source": [
    "annual_revenue = [120,98,156]\n",
    "annual_revenue = list(filter(lambda x: x>0, annual_revenue)) #只取大于0的部分\n",
    "avg_revenue = sum(annual_revenue)/len(annual_revenue)\n",
    "CAOR = avg_revenue * 0.15 #基本指标法，统一预留15%\n",
    "print('capital at operation risk(CAOR): %f mil'%CAOR)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "426c7965",
   "metadata": {
    "papermill": {
     "duration": 0.005816,
     "end_time": "2022-03-30T02:05:39.009271",
     "exception": false,
     "start_time": "2022-03-30T02:05:39.003455",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "papermill": {
   "default_parameters": {},
   "duration": 10.513184,
   "end_time": "2022-03-30T02:05:39.625506",
   "environment_variables": {},
   "exception": null,
   "input_path": "__notebook__.ipynb",
   "output_path": "__notebook__.ipynb",
   "parameters": {},
   "start_time": "2022-03-30T02:05:29.112322",
   "version": "2.3.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
